﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Warehouse.Application.Dto.Input;
using Warehouse.Application.Dto.Output;
using Warehouse.Domain.Entities;
using Warehouse.Result;

namespace Warehouse.Application.Services.Libraryrecord
{
    public interface ILibraryrecordAppService
    {
        /// <summary>
        /// 添加出入库的库存
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        ApiResult<int> CreateLibraryrecord (CreateLibraryrecordInput input);
        /// <summary>
        /// 获取出入库的库存
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        ApiPaing<LibraryrecordOutput> GetLibraryrecord(LibraryrecordInput input);

        /// <summary>
        /// 出库
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        ApiResult<int> OutLibraryrecord(OutLibraryrecordInput input);
        /// <summary>
        /// 流水查询
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        ApiPaing<SpringWaterOutput> GetApringWater(GetApringWaterInput input);



        /// <summary>
        /// 获取时间生成距状图
        /// </summary>
        /// <returns></returns>
        object PayMoney();

        /// <summary>
        /// 获取7天时间生成距状图
        /// </summary>
        /// <returns></returns>
        object PayMoneyday();

        /// <summary>
        /// 获取30天时间生成距状图
        /// </summary>
        /// <returns></returns>
        object PayMoneyMonth();

        /// <summary>
        /// 更新每日仓库统计数据
        /// </summary>
        /// <param name="date">指定日期，默认为今天</param>
        /// <returns></returns>
        Task<ApiResult<bool>> UpdateDailyStatistics(DateTime? date = null);
        /// <summary>
        /// 查询当天的统计
        /// </summary>
        /// <param name="Jtime"></param>
        /// <returns></returns>
        ApiResult<WideTableModel> GetWideTable(DateTime Jtime);

        /// <summary>
        /// 定时任务：每天凌晨清除并更新Redis缓存数据
        /// </summary>
        /// <returns></returns>
        Task RefreshRedisCacheDaily();
    }
}
